package cn.tianyun.pethome.basic.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AjaxResult {
    private boolean success;
    private  String msg;
    private Object data;

    public static AjaxResult creat(){
        AjaxResult result = new AjaxResult();
        return result;
    }

    public AjaxResult setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public AjaxResult setMsg(String msg) {
        this.msg = msg;
        return this;
    }
    public AjaxResult setResultObj(Object o){
        this.data=o;
        return this;
    }
}
